{% load base_tags %}
{% if errors.object_list %}
	<table id="error-list">
		<tr>
			<td class="header">Zeitpunkt</td>
			<td class="header">Code</td>
			<td class="header">Aufgetretener Fehler</td>
			<td class="header">&nbsp;</td>
		</tr>	
		{% for error in errors.object_list %}
		<tr id="error_row1_{{ error.id }}" class="feed_{{ error.feed.id }}">
			<td class="error-list-timestamp">{{ error.timestamp|format_date }}<br />{{ error.timestamp|format_time }}</td>
			<td class="error-list-error">{{ error.error_no }}</td>
			<td class="error-list-msg">
				{{ error.msg }}<br />
				<span id="feed{{ error.feed.id }}_name" class="error-list-feed">{{ error.feed.name }}</span><br />
				<span class="error-list-url">{{ error.url }}</span>
			</td>
			<td class="error-list-action"><button type="button" onclick="javascript:remove_feed({{ error.feed.id }});">Feed abbestellen</button></td>
		</tr>
		{% endfor %}
	</table>
	<div class="pagination">
        {% if errors.has_previous %}
        	<button type="button" onclick="javascript:reload_errorlog({{ errors.previous_page_number }});">Vorherige Meldungen</button>
        {% endif %}
        Seite {{ errors.number }} von {{ errors.paginator.num_pages }}
        {% if errors.has_next %}
        	<button type="button" onclick="javascript:reload_errorlog({{ errors.next_page_number }});">Nächste Meldungen</button>
        {% endif %}
	</div>	
{% else %}
	<strong>Glückwunsch! Es sind keine Fehler verzeichnet.</strong>
{% endif %}
